<%-- 
    Document   : pertanyaan_taha_main
    Created on : Aug 13, 2012, 2:09:37 PM
    Author     : ubuntu
--%>
<%@ include file="/WEB-INF/jsp/include/page_header.jspf" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Kemaskini Profil</title>
        <script type="text/javascript">
            $(document).ready(function(){
//                $('form').submit( function () {
//                    return formValidation();
//                });              
                $('#noAkaunDari').change(function(){                    
                    var url = '${pageContext.request.contextPath}/deposit?getNoKP' ;
                    $.get(url, 
                    {
                        noAkaun:$(this).val()
                    }, 
                    function(data){
                        $('#noKp').val(data);
                    }, "text");
                });
            });

            function resetAll()
            {
                document.getElementById("noAkaunDari").value="";
                document.getElementById("noKp").value="";
            }
            
        </script>
    </head>
    <body>
        <s:messages/>
        <s:errors/> 
        <br/>
        <s:form beanclass="th.stripes.action.DepositActionBean" class="niceform">
            <div id="content">
                <div id="logo">
                    <span>
                        <img src="${pageContext.request.contextPath}/images/img/ribbon.png"/>               
                    </span>
                </div>
                <h3>
                    Kemaskini Profil
                </h3> 
                <p>
                    <label>No. Akaun TH :</label>
                     <s:select name="deposit.noAkaun" class="required" id="noAkaunDari">
                        <s:option value="">Sila Pilih</s:option>
                        <c:forEach items="${actionBean.accountList}" var="item">
                            <s:option value="${item.akaunTmbhn}">${item.akaunTmbhn}</s:option>
                        </c:forEach>
                    </s:select>
                </p>
                <p>
                    <label>No. KP Semasa :</label>
                    <s:text name="deposit.noKp" id="noKp" readonly="true"></s:text>  
                </p>
                <p align="center">
                    <s:submit name="showProfile" value="Semak" class="button green button_blockUI"/>
                    <s:button name="reset" value="Isi Semula" onclick="resetAll();" class="button green"/>
                </p>
            </div>
        </s:form>
    </body>
</html>
